package com.second.app.designpattern.observer.eventbus;

import com.google.common.eventbus.Subscribe;

/**
 * @Author GYZ
 * @Date 2023/11/10
 * <pre>
 *
 * </pre>
 */
public class RegNotificationObserver implements RegisterObserver{


    private INotificationService notificationService;

    public RegNotificationObserver(INotificationService notificationService){
         this.notificationService =notificationService;
    }

    @Subscribe
    @Override
    public void handleRegisterSuccess(Long userId) {
        notificationService.sendInboxMessage(userId,"hello-world");
    }
}
